<template>
	<view class="mine">
		<!-- <view class="head">
			我的足迹
		</view> -->
		<view class="dmap">
			<map class="map" @click="aa" :longitude="longitude" :latitude="latitude" :markers="markers" :scale="scale"></map>
		</view>
	</view>
</template>

<script>
	import store from '../../store/index.js'
	export default {
		data() {
			return {
				longitude: 113.954354, // 经度
				latitude: 35.302603, // 维度
				scale: 6,
				markers: [{
						id: 1,
						longitude: 113.954354, // 经度
						latitude: 35.302603, // 维度
						iconPath: '../../static/school.png',
						width: 30,
						height: 30
					},
					{
						id: 2,
						longitude: 111.663, // 经度
						latitude: 33.75186, // 维度
						content: '老君山',
						iconPath: '../../static/zuji.png',
						width: 30,
						height: 30
					},
					{
						id: 3,
						longitude: 112.480425, // 经度
						latitude: 34.561904, // 维度
						content: '龙门石窟',
						iconPath: '../../static/zuji.png',
						width: 30,
						height: 30
					},
					{
						id: 4,
						longitude: 109.282223, // 经度
						latitude: 34.386947, // 维度
						content: '兵马俑',
						iconPath: '../../static/zuji.png',
						width: 30,
						height: 30
					},
					{
						id: 5,
						longitude: 108.964939, // 经度
						latitude: 34.214976, // 维度
						content: '不夜城',
						iconPath: '../../static/zuji.png',
						width: 30,
						height: 30
					},
				]
			}
		},
		onShow() {
			store.state.innerAudioContext.pause() // 停止播放
		},
		methods: {
			aa () {
				uni.openLocation({
						latitude: Number(this.latitude),
						longitude: Number(this.longitude),
						// name: this.title,
						// address: this.info.province_name + this.info.city_name + this.info.area_name + this.info.address,
						scale: 28
					})

			}
		}
	}
</script>

<style>
	.mine {
		/* padding: 20rpx; */
	}

	.head {
		text-align: center;
		font-weight: 600;
		margin: 20rpx 0 20rpx 0;
		font-size: 40rpx;
	}
	page,
	.mine,
	.dmap,
	.map {
		width: 100%;
		/* height: 300px; */
		height: 100%;
	}
</style>
